home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20021006-20030409 / 000039_fdc@columbia.edu_Tue Oct 29 10:05:57 EST 2002.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  77 lines

  1. Article: 13802 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
  3. From: fdc@columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: redirect io to external cmd (like cu "~|cmd" and "~$cmd")
  6. Date: 29 Oct 2002 10:05:46 -0500
  7. Organization: Columbia University
  8. Lines: 60
  9. Message-ID: <apm84a$im0$1@watsol.cc.columbia.edu>
  10. References: <86c66124.0210280643.30d17ab6@posting.google.com> <apjj8d$pk3$1@watsol.cc.columbia.edu> <86c66124.0210290137.a992437@posting.google.com>
  11. NNTP-Posting-Host: watsol.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1035903947 10209 128.59.39.139 (29 Oct 2002 15:05:47 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 29 Oct 2002 15:05:47 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13802
  16.  
  17. In article <86c66124.0210290137.a992437@posting.google.com>,
  18.  <pytcayrn@freemail.hu> wrote:
  19. : Thanks a lot, that's exactly what I was looking for.
  20. : I managed to log the output to a file, and then "tail -f" the file to
  21. : "od", so this solved my problem. BTW logging the output to "|od >
  22. : session.log" failed for me (the "od" process didn't even show up in
  23. : "ps -ef"). I guess I well escaped the space characters with an "\".
  24. It works fine here.  Maybe you need C-Kermit 8.0:
  25.  
  26.   http://www.columbia.edu/kermit/ckermit.html
  27.  
  28. : I few other questions that I would be very happy to get some answer:
  29. : How can I stop kermit to print the data to the screen, so that the
  30. : data should only be printed to the session.log file?
  31. Most messages are surpressed if you start Kermit with "-q" on the command
  32. line or tell it to "set quiet".  But that doesn't apply to CONNECT mode.
  33. If you don't anything to appear on the screen, then don't enter CONNECT
  34. mode.  One way to do this would be:
  35.  
  36.   set port /dev/tty0p2
  37.   set speed 57600  ; or whatever
  38.   set flow rts/cts ; or whatever
  39.   set session log binary
  40.   log session "|od -tx1 > session.log"
  41.   input <sec> <string>
  42.  
  43. The INPUT command is described as follows (by C-Kermit 8.0 "help input"):
  44.  
  45.   Syntax:  INPUT { number-of-seconds, time-of-day } [ text ]
  46.   Example: INPUT 5 Login:  or  INPUT 23:59:59 RING
  47.     Waits up to the given number of seconds, or until the given time of day
  48.     for the given text to arrive on the connection.  If no text is given,
  49.     INPUT waits for any character.  For use in script programs with IF
  50.     FAILURE and IF SUCCESS.  Also see MINPUT, REINPUT, SET INPUT.  See HELP
  51.     PAUSE for details on time-of-day format.  The text, if given, can be a
  52.     \pattern() invocation, in which case it is treated as a pattern rather
  53.     than a literal string (HELP PATTERNS for details).  If the timeout
  54.     interval is 0, the INPUT command does not wait; i.e. the given text must
  55.     already be available for reading for the INPUT command to succeed.  If
  56.     the interval is negative, the INPUT command waits forever.
  57.  
  58. : Does kermit have an echo-like built-in function with which I could
  59. : send binary data to the serial line from kermit prompt, e.g. "echo
  60. : 0xFF,0x1D,0xB3" while the connection is alive and data is dumped to
  61. : session.log ?
  62. The OUTPUT command ("help output" for more info).  Example:
  63.  
  64.   output \xff\x1d\xb3
  65.  
  66. : I am trying to communicate with a GPS receiver :)
  67. You might find some of the examples in our script library helpful:
  68.  
  69.   http://www.columbia.edu/kermit/ckscripts.html
  70.  
  71. - Frank
  72.